Skip to content

feat: add Browser scene, web-element context and relay server improvements#163

Merged
bobleer merged 2 commits intoGCWing:mainfrom
bobleer:feature/browser-scene-and-enhancements-20250315
Mar 15, 2026
Merged

feat: add Browser scene, web-element context and relay server improvements#163
bobleer merged 2 commits intoGCWing:mainfrom
bobleer:feature/browser-scene-and-enhancements-20250315

Conversation

@bobleer
Copy link
Collaborator

@bobleer bobleer commented Mar 15, 2026

Summary

  • Browser Scene: Add a new embedded Browser scene with Tauri webview integration and element inspector, allowing users to browse web pages directly within BitFun
  • Web Element Context: Introduce WebElementContext type and supporting infrastructure, enabling users to reference and share web page elements as context in chat conversations
  • Chat Input Improvements: Fix focus management and context tag insertion reliability — activate input before inserting tags, use requestAnimationFrame for focus timing
  • Relay Server Hardening: Bind to 127.0.0.1 by default for security, redesign the landing page with modern UI, and fix workspace dependency resolution in Cargo.toml

Changes

Frontend (src/web-ui/)

  • New BrowserScene and BrowserPanel components with URL bar, navigation controls, and element inspector
  • Register browser scene in scene registry, viewport, and navigation
  • Add WebElementContext type and WebElementContextImpl for context system
  • Improve ChatInput focus and tag insertion logic
  • Add web-element serialization in useMessageSender
  • Add i18n keys for browser scene (en-US, zh-CN)

Desktop (src/apps/desktop/)

  • Add browser_api.rs with browser_webview_eval and browser_pull_debug_logs commands
  • Add webview capabilities in default.json and new browser-webview.json
  • Enable Tauri unstable feature for webview API support

Relay Server (src/apps/relay-server/)

  • Bind to 127.0.0.1 via RELAY_HOST_BIND_IP env variable for security
  • Redesign index.html landing page
  • Fix Cargo.toml to use explicit versions instead of broken workspace refs

Mobile Web (src/mobile-web/)

  • Update App.tsx with enhanced layout

Test plan

  • Verify Browser scene opens from the scene bar and can navigate to URLs
  • Test element inspector captures web elements and inserts them as context tags in chat
  • Confirm ChatInput properly focuses and inserts context tags when triggered
  • Verify relay server starts with start.sh and binds to 127.0.0.1
  • Check i18n labels display correctly in both English and Chinese

Made with Cursor

bowen628 added 2 commits March 15, 2026 23:18
…ments

- Add embedded Browser scene with Tauri webview integration and inspector
- Introduce WebElementContext type for referencing web page elements in chat
- Improve ChatInput focus management and context tag insertion reliability
- Harden relay server: bind to 127.0.0.1, redesign landing page, fix deps
- Add browser-related Tauri capabilities and API commands

Made-with: Cursor
Accept upstream's collapsed chat input styling (cursor: text,
max-width: 300px, pill-shaped border-radius, symmetric padding).

Made-with: Cursor
@bobleer bobleer merged commit f7174ea into GCWing:main Mar 15, 2026
4 checks passed
bobleer added a commit to bobleer/BitFun that referenced this pull request Mar 15, 2026
…ments (GCWing#163)

- Add embedded Browser scene with Tauri webview integration and inspector
- Introduce WebElementContext type for referencing web page elements in chat
- Improve ChatInput focus management and context tag insertion reliability
- Harden relay server: bind to 127.0.0.1, redesign landing page, fix deps
- Add browser-related Tauri capabilities and API commands

Co-authored-by: bowen628 <bowen628@noreply.gitcode.com>
@bobleer bobleer deleted the feature/browser-scene-and-enhancements-20250315 branch March 22, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant